package com.cenwangkeji.resident.ui.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.cenwangkeji.resident.R;
import com.cenwangkeji.resident.model.bean.FileIconBean;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

/**
 * @松 on 2019/10/25 16:22
 */
public class FileAdapter extends BaseQuickAdapter<FileIconBean, BaseViewHolder> {
    public FileAdapter( @Nullable List<FileIconBean> data) {
        super(R.layout.item_file, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, FileIconBean item) {
         helper.setText(R.id.tv_name, item.getName());
         ImageView imageView = helper.getView(R.id.iv);
         imageView.setImageResource(item.getIcon());
    }
}
